package tt.dz.service.imp.sys;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by Administrator on 2016/12/2.
 */
public class PaymentDetail
{
	private float fee;
	private float rate;
	private float num;
	private String startTime;
	private String endTime;
	private int paymentMode;

//	private static final SimpleDateFormat dateFormat = new SimpleDateFormat("HH:mm");
	private static final SimpleDateFormat dateFormat = new SimpleDateFormat("YYYY-MM-DD HH:mm:ss");

	public static String formatDate(Date dt)
	{
		if (dt == null)
			return null;
		return dateFormat.format(dt);
	}

	public PaymentDetail(float fee, float rate, float num, Date startTime, Date endTime, int paymentMode)
	{
		this.fee = fee;
		this.rate = rate;
		this.num = num;
		this.startTime = formatDate(startTime);
		this.endTime = formatDate(endTime);
		this.paymentMode = paymentMode;
	}

	public PaymentDetail(float fee, float rate, float num, String startTime, String endTime, int paymentMode)
	{
		this.fee = fee;
		this.rate = rate;
		this.num = num;
		this.startTime = startTime;
		this.endTime = endTime;
		this.paymentMode = paymentMode;
	}

	public float getFee()
	{
		return fee;
	}

	public void setFee(float fee)
	{
		this.fee = fee;
	}

	public String getStartTime()
	{
		return startTime;
	}

	public void setStartTime(String startTime)
	{
		this.startTime = startTime;
	}

	public String getEndTime()
	{
		return endTime;
	}

	public void setEndTime(String endTime)
	{
		this.endTime = endTime;
	}

	public int getPaymentMode()
	{
		return paymentMode;
	}

	public void setPaymentMode(int paymentMode)
	{
		this.paymentMode = paymentMode;
	}

	public float getRate()
	{
		return rate;
	}

	public void setRate(float rate)
	{
		this.rate = rate;
	}

	public float getNum()
	{
		return num;
	}

	public void setNum(float num)
	{
		this.num = num;
	}
}
